public class Student {
    private float score;
    private int math=78;
    private int chinese=99;
    private int english=88;
    private  String color="白色";
    private float ave;
    void scoreStudent(){//ScoreStudent方法
        this.score=this.math+this.chinese+this.english;
        System.out.printf("语文分数为%d,数学为%d,英语为%d,总分为%f",this.chinese,this.math,this.english,this.score);
    }
    void colorStudent(){//ColorStudent方法
        System.out.println("今天穿的衣服颜色为"+color);
    }
    float averageStudent() { //averageStudent方法
        this.ave = (this.math + this.chinese + this.english) / 3;
        System.out.println("平均分为"+this.ave);
        if (this.math < this.ave) {
            System.out.println("数学低于平均分");
        } else if (this.english < this.ave) {
            System.out.println("英语低于平均分");
        } else if (this.math < this.ave || this.english < this.ave || this.chinese < this.ave) {
            System.out.println("三门学科有一门低于平均分");
        }
        return 0;
    }
    Student(int a,int b){//构造方法
        this.chinese=a;
        this.english=b;

    }
    Student(String x){//构造方法
        this.color=x;

    }

}

